package main

import (
	"database/sql"
	"fmt"
	_ "github.com/godror/godror"
)

func main() {
	dns := `user="o2oa"
			password="JieYiSoft123"
			connectString="192.168.1.225:1521/devdb"
			libDir="/Users/root/Downloads/instantclient_19_8"
			`

	db, err := sql.Open("godror", dns)
	if err != nil {
		fmt.Print(err)
	}
	defer db.Close()
	db.Ping()

	sql := "select xid, xcreatetime from ARA_DISTRICT where 1=1"
	rows, _ := db.Query(sql)
	defer rows.Close()
	var xid, xcreatetime string
	for rows.Next() {
		rows.Scan(&xid, &xcreatetime)
		fmt.Printf("IntCol=%s, StrCol=%s\n", xid, xcreatetime)
	}
	err = rows.Err()

}
